package ribbonconfiguration;

import com.netflix.loadbalancer.IPing;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.PingUrl;
import com.netflix.loadbalancer.RandomRule;
import com.ysh.contentcenter.configuration.NacosSameClusterWeightedRule;
import com.ysh.contentcenter.configuration.NacosWeightedRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RibbonConfiguration {
    // 配置负载均衡的规则
    @Bean
    public IRule ribbonRuble(){
        return new NacosSameClusterWeightedRule();
    }

}
